package com.lsz.crm.mapper;

import com.lsz.crm.base.BaseMapper;
import com.lsz.crm.pojo.UserRole;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface UserRoleMapper extends BaseMapper<UserRole,Integer> {

    /**
     * 根据用户id查询用户角色记录数量
     * @param userId
     * @return
     */
    Integer countUserRoleByUserId(Integer userId);

    /**
     * 根据用户 id 删除用户角色记录
     * @param userId
     * @return
     */
    Integer deleteUserRoleByUserId(Integer userId);
}